<html>

<head>
    <meta charset="UTF-8">
    <title>js数据类型</title>
</head>

<body>
    <ol>
        <li>a<a>aaaaaa</a></li>
        <li>b</li>
        <li>c</li>
        <li>d</li>
        <li>e</li>
    </ol>
    <script>
    'use strict'

    let a = false;
    a = 5;

    let sites = ['sina', 'baidu', 'qq']

    let c = '500 years';


    var oLi = document.getElementsByTagName('li');
    for (var i in oLi) { console.log(i + '=' + oLi[i]); }
    console.log(oLi);
    console.log(oLi.length);
    console.log(oLi[0].childNodes[0].nodeValue);
    console.log(oLi[0].childNodes[0].nodeName);
    console.log(oLi[0].nodeName);
    console.log(oLi[0].nodeType);
    console.log(oLi[0].childNodes[0].nodeType);
    var oP = document.createElement("p");
    var oText = document.createTextNode("这是一个使用DOM生成的段落");
    oP.appendChild(oText);
    document.body.appendChild(oP);
    </script>
</body>

</html>
